package com.nuoniu.sibanyun.mapper.crm.call;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.crm.call.CrmCallTaskDetail;
import com.nuoniu.sibanyun.entity.crm.call.dto.CrmCallTaskDetailSearchDto;
import com.nuoniu.sibanyun.entity.crm.call.dto.CrmCallTaskDetailUpdateDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 客户管理-外呼管理-外呼任务明细 Mapper 接口
 * </p>
 *
 * @author 白强
 * @since 2022-03-03
 */
public interface CrmCallTaskDetailMapper extends BaseMapper<CrmCallTaskDetail> {

    List<CrmCallTaskDetail> listTaskDetail(Integer companyId,@Param("dto") CrmCallTaskDetailSearchDto crmCallTaskDetailSearchDto);

    Set<Long> listCrmIds(Integer companyId, Long taskId, String ids);

    Set<Long> listLinkManIds(Integer companyId,Long taskId, String ids);

    int batchDelete(Integer companyId,Long taskId, String ids);

    /**
     * 更新 统计信息(任务 和 任务明细)
     * @param callTaskDetailUpdateDto
     * @return
     */
    int updateDetailSateAndCount(@Param("dto") CrmCallTaskDetailUpdateDto callTaskDetailUpdateDto);



}
